package com.thouiot.common.exception;

/**
 * @description 运行时异常
 * @author yuanqizhishi
 * @date 2025/04/09 13:07
 */
public class TiotRuntimeException extends RuntimeException {
    private static final long serialVersionUID = 186145334423794261L;

    private IErrorCode errorCodeEnum;

    public TiotRuntimeException(String message) {
        super(message);
    }

    public TiotRuntimeException(IErrorCode errorCode) {
        super(errorCode.getMsg());
        this.errorCodeEnum = errorCode;
    }

    public IErrorCode getErrorCodeEnum() {
        return errorCodeEnum;
    }

    public void setErrorCodeEnum(IErrorCode errorCodeEnum) {
        this.errorCodeEnum = errorCodeEnum;
    }
}
